.chat-container {
    min-height: calc(100vh - 260px);
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
    position: relative;
    margin-top: 20px;
}
.chat-messages {
    flex: 1;
    padding: 20px;
    background: #f8f9fa;
    padding-bottom: 100px;
}
.message {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.message.user {
    align-items: flex-end;
}
.message.ai {
    align-items: flex-start;
}
.message-header {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 4px;
    padding: 0 4px;
}
.message-content {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
}
.user .message-content {
    background-color: #4a90e2;
    color: white;
    border-bottom-right-radius: 4px;
}
.ai .message-content {
    background-color: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,.1);
}
.system-message {
    align-items: center;
    margin-bottom: 30px;
}
.system-message .message-content {
    background-color: #e3f2fd;
    color: #1976d2;
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 20px;
    max-width: 90%;
    text-align: center;
}
.system-message .message-content i {
    margin-right: 8px;
}
.chat-input {
    position: fixed;
    bottom: 20px;
    left: 260px;
    right: 20px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,.1);
    z-index: 1000;
}
.input-group {
    display: flex;
    gap: 10px;
    max-width: 800px;
    margin: 0 auto;
}
.input-group input {
    border-radius: 20px;
    padding: 10px 20px;
    border: 1px solid #ddd;
    flex: 1;
}
.input-group input:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 0.2rem rgba(74,144,226,.25);
}
.input-group button {
    border-radius: 20px;
    padding: 10px 20px;
    background-color: #4a90e2;
    border: none;
    transition: all 0.3s ease;
    min-width: 100px;
}
.input-group button:hover {
    background-color: #357abd;
    transform: translateY(-1px);
}
.input-group button:active {
    transform: translateY(0);
}
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 12px;
    width: fit-content;
    margin-bottom: 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,.1);
}
.typing-dot {
    width: 8px;
    height: 8px;
    background: #4a90e2;
    border-radius: 50%;
    animation: typing 1s infinite;
}
.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}
.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}
@keyframes typing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@media (max-width: 768px) {
    .chat-input {
        left: 20px;
    }
}